package com.itheima.controller;


import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.entity.Result;

import com.itheima.pojo.Member;
import com.itheima.service.MemberService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
@RequestMapping("/member")
public class MemberController {
    @Reference
    MemberService memberService;

    @RequestMapping("/getFamily.do")
    public Result getFamily(@com.itheima.interceptor.Member Member member){
        //根据当前登录用户id查询用户的家庭联系人
        List<Member> members = memberService.getFamily(member.getId());


        return Result.success("查询家庭联系人成功",members);
    }


}
